package org.millioncall.yueyoga.admin.service.impl;

import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.dao.ContactDAO;
import org.millioncall.yueyoga.admin.model.Contact;
import org.millioncall.yueyoga.admin.service.ContactService;
import org.springframework.stereotype.Service;

@Service
public class ContactServiceImpl implements ContactService {
	private ContactDAO contactDAO;

	public ContactDAO getContactDAO() {
		return contactDAO;
	}

	public void setContactDAO(ContactDAO contactDAO) {
		this.contactDAO = contactDAO;
	}

	@Override
	public PaginatedList<Contact> findContactByMemberId(Map<String, Object> map, int start,
			int limit) {
		// TODO Auto-generated method stub
		return contactDAO.findContactByMemberId(map,start,limit);
	}

	@Override
	public boolean insert(Contact contact) {
		// TODO Auto-generated method stub
		int i= contactDAO.insert(contact);
		if(i==0){
			return false;
		}else{
			return true;
		}
	}
}
